﻿<Window x:Class="frmAdminTransferCases"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   
    Title="Transfer Cases" Height="569" Width="805" WindowStyle="ToolWindow" WindowStartupLocation="CenterScreen">
    <Window.Resources>
        <ControlTemplate x:Key="ItemTemplate" TargetType="ListViewItem">
            <Border
		BorderThickness="{TemplateBinding Border.BorderThickness}"
		Padding="{TemplateBinding Control.Padding}"
		BorderBrush="{TemplateBinding Border.BorderBrush}"
		Background="{TemplateBinding Panel.Background}"
		SnapsToDevicePixels="True">
                <ContentPresenter
			Content="{TemplateBinding ContentControl.Content}"
			ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
			HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
			VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
			SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
            </Border>
        </ControlTemplate>

        <Style TargetType="ListViewItem">
            <Setter Property="Template" Value="{StaticResource ItemTemplate}" />
        </Style>

        <DataTemplate x:Key="ItemDataTemplate">
            <CheckBox
			x:Name="checkbox"
			Content="{Binding}"
			IsChecked="{Binding	RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListViewItem}}, Path=IsSelected}" />
        </DataTemplate>

    </Window.Resources>
    <StackPanel Height="524" Width="754">
        <GroupBox Header="From" Margin="18,12,34,0" Name="grpFrom" Height="127" VerticalAlignment="Top">
            <Grid Height="105">
                <ComboBox Height="23" Margin="180,10,0,0" Name="drpBranch" VerticalAlignment="Top" HorizontalAlignment="Left" 

Width="186" />
                <ComboBox Height="23" Margin="180,39,0,0" Name="drpDepts" VerticalAlignment="Top" HorizontalAlignment="Left" 

Width="186" />
                <ComboBox Height="23" Margin="180,68,0,0" Name="drpCons" VerticalAlignment="Top" HorizontalAlignment="Left" 

Width="186" />
                <Label Height="23" HorizontalAlignment="Left" Margin="10,10,0,0" Name="Label1" VerticalAlignment="Top" 

Width="120">Branch</Label>
                <Label Height="23" HorizontalAlignment="Left" Margin="10,39,0,0" Name="Label2" VerticalAlignment="Top" 

Width="120">Department</Label>
                <Label Height="23" HorizontalAlignment="Left" Margin="10,68,0,0" Name="Label3" VerticalAlignment="Top" 

Width="120">Consultant</Label>
                <GroupBox Header="Select Consultant's Role" Height="54" HorizontalAlignment="Left" Margin="416,23.138,0,0" 

Name="GroupBoxa" VerticalAlignment="Top" Width="257">
                    <Grid Height="30">
                        <RadioButton Height="16.723" HorizontalAlignment="Left" IsChecked="True" Margin="6,6,0,0" 

Name="rdoSelectCSM" VerticalAlignment="Top" Width="92">CSM</RadioButton>
                        <RadioButton Height="16.723" Margin="120,6.277,33,0" Name="rdoSelectCC" 

VerticalAlignment="Top">CC</RadioButton>
                    </Grid>
                </GroupBox>
            </Grid>
        </GroupBox>
        <CheckBox x:Name="selectAll" Content="Select all" Click="OnSelectAllChanged" />
        <ListView
			x:Name="checkedListView"
			SelectionMode="Multiple"
			ItemsSource="{Binding}"
			ItemTemplate="{StaticResource ItemDataTemplate}"
			CheckBox.Unchecked="OnUncheckItem" />
        <Button Click="OnShowSelectedItems" Content="Show selected items" />
        <Grid>
            <ListView FontFamily="Comic Sans MS" Margin="6,0,6,-174" Name="lstcases" MaxHeight="200"> 
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <StackPanel>
                            <StackPanel Margin="0" Orientation="Horizontal">
                                <CheckBox Name="checkbox" />
                                <TextBlock Padding="3" Text="{Binding Path=caseid}" />
                                <TextBlock Padding="3" Text="{Binding Path=prodtype}" />
                                <TextBlock Padding="3" Text="{Binding Path=prodname}" />
                            </StackPanel>
                        </StackPanel>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>
        </Grid>
        <GroupBox Header="To" Height="151" Name="grpTo" Width="754" Margin="0,200,350,0">
            <Grid Height="125">
                <ComboBox Height="23" Margin="176,38,357,0" Name="cboBranch1" VerticalAlignment="Top" />
                <ComboBox Height="23" Margin="176,0,357,35" Name="cbodept1" VerticalAlignment="Bottom" />
                <ComboBox Height="23" Margin="176,0,357,6" Name="cbocons1" VerticalAlignment="Bottom" />
                <Label Height="23" HorizontalAlignment="Left" Margin="6,0,0,35" Name="Label5" VerticalAlignment="Bottom" Width="120">Department</Label>
                <Label Height="23" HorizontalAlignment="Left" Margin="6,0,0,6" Name="Label6" VerticalAlignment="Bottom" Width="120">Consultant</Label>
                <GroupBox Header="Select Consultant's Role" Height="54" HorizontalAlignment="Left" Margin="416,23.138,0,0" Name="GroupBox4" VerticalAlignment="Top" Width="257">
                    <Grid Height="30">
                        <RadioButton Height="16.723" HorizontalAlignment="Left" IsChecked="True" Margin="6,6,0,0" Name="rdoCons" VerticalAlignment="Top" Width="92">CSM</RadioButton>
                        <RadioButton Height="16.723" Margin="120,6.277,33,0" Name="rdoCC" VerticalAlignment="Top">CC</RadioButton>
                    </Grid>
                </GroupBox>
                <CheckBox Height="16" HorizontalAlignment="Left" Margin="6,16,0,0" Name="chkSelectAll" VerticalAlignment="Top" Width="120">Select All</CheckBox>
                <Button Height="25" HorizontalAlignment="Right" Margin="0,0,226,17" Name="btnTransfer" VerticalAlignment="Bottom" Width="75">Transfer</Button>
                <Label Height="23" HorizontalAlignment="Left" Margin="6,38,0,0" Name="Label4" VerticalAlignment="Top" Width="120">Branch</Label>
            </Grid>
        </GroupBox>
    </StackPanel>     
</Window>
